package com.banksoft.cps.controller.admin;

import com.banksoft.cps.bean.CompanyRegister;
import com.banksoft.cps.controller.ControllerConstants;
import com.banksoft.cps.service.CompanyRegisterService;
import com.banksoft.cps.util.UserContext;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * Created by rongzhao.zhu on 2018/1/15.
 */
@Controller
@RequestMapping("/admin/companyRegister/")
public class AdminCompanyRegisterController extends ControllerConstants {
    @Autowired
    CompanyRegisterService companyRegisterService;
    @RequestMapping(value = "find",produces = "application/json;charset=utf-8")
    @ResponseBody
    public String find(String companyId){
        CompanyRegister bean = companyRegisterService.findByCompanyId(companyId);
        return toJSONString(createDataTip(bean));
    }
}
